Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(avm): add SET serialize comments and simplify signature #4476

Conversation

fcarreiro
Copy link
Contributor

No description provided.

Copy link
Contributor Author

fcarreiro commented Feb 7, 2024

@AztecBot
Copy link
Collaborator

AztecBot commented Feb 7, 2024

Benchmark results

Metrics with a significant change:

  • batch_insert_into_append_only_tree_32_depth_ms (512): 312 (+31%)
  • batch_insert_into_append_only_tree_32_depth_hash_ms (512): 0.568 (+30%)
Detailed results

All benchmarks are run on txs on the Benchmarking contract on the repository. Each tx consists of a batch call to create_note and increment_balance, which guarantees that each tx has a private call, a nested private call, a public call, and a nested public call, as well as an emitted private note, an unencrypted log, and public storage read and write.

This benchmark source data is available in JSON format on S3 here.

Values are compared against data from master at commit 545b3341 and shown if the difference exceeds 1%.

L2 block published to L1

Each column represents the number of txs on an L2 block published to L1.

Metric 8 txs 32 txs 128 txs
l1_rollup_calldata_size_in_bytes 45,636 180,516 720,036
l1_rollup_calldata_gas 222,456 870,684 3,464,412
l1_rollup_execution_gas 314,943 988,424 3,684,069
l2_block_processing_time_in_ms 1,240 (+7%) 4,373 (+1%) 17,385 (+1%)
note_successful_decrypting_time_in_ms 303 (-1%) 971 (+1%) 3,707 (+3%)
note_trial_decrypting_time_in_ms 12.6 (-38%) 103 (+11%) 146 (+4%)
l2_block_building_time_in_ms 17,907 70,947 (+1%) 284,283
l2_block_rollup_simulation_time_in_ms 13,077 51,771 207,857
l2_block_public_tx_process_time_in_ms 4,795 19,094 (+1%) 76,168

L2 chain processing

Each column represents the number of blocks on the L2 chain where each block has 16 txs.

Metric 5 blocks 10 blocks
node_history_sync_time_in_ms 14,753 (-4%) 28,933 (-1%)
note_history_successful_decrypting_time_in_ms 2,323 (-4%) 4,564 (+1%)
note_history_trial_decrypting_time_in_ms 85.5 208 (+3%)
node_database_size_in_bytes 17,285,200 33,034,320
pxe_database_size_in_bytes 29,923 59,478

Circuits stats

Stats on running time and I/O sizes collected for every circuit run across all benchmarks.

Circuit circuit_simulation_time_in_ms circuit_input_size_in_bytes circuit_output_size_in_bytes
private-kernel-init 312 44,476 26,153
private-kernel-ordering 198 44,473 16,553
base-rollup 1,401 128,930 881
root-rollup 82.1 4,088 677
private-kernel-inner 444 71,607 26,153
public-kernel-private-input 247 32,563 26,153
public-kernel-non-first-iteration 246 32,605 26,153
merge-rollup 7.65 (+1%) 2,608 881

Tree insertion stats

The duration to insert a fixed batch of leaves into each tree type.

Metric 1 leaves 2 leaves 8 leaves 16 leaves 32 leaves 128 leaves 64 leaves 512 leaves 1024 leaves 2048 leaves 8192 leaves
batch_insert_into_append_only_tree_16_depth_ms 10.3 (+1%) 11.0 (+1%) 12.6 17.0 22.8 64.3 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_count 16.9 17.5 23.0 31.6 47.0 143 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.597 (+1%) 0.616 (+1%) 0.538 0.528 0.478 0.442 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A N/A N/A N/A 74.5 48.2 (+2%) ⚠️ 312 (+31%) 460 899 3,564 (+1%)
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A N/A N/A N/A 159 96.0 543 1,055 2,079 8,223
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A N/A N/A N/A 0.460 0.495 (+1%) ⚠️ 0.568 (+30%) 0.431 0.427 0.428
batch_insert_into_indexed_tree_20_depth_ms N/A N/A N/A N/A N/A 104 (+1%) 56.4 352 (+1%) 685 1,370 (+1%) 5,437 (+1%)
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A N/A N/A N/A 197 104 691 1,363 2,707 10,771
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A N/A N/A N/A 0.494 0.495 0.479 (+1%) 0.472 0.475 (+1%) 0.472
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A 56.5 N/A N/A N/A N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A N/A 94.1 N/A N/A N/A N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A N/A 0.578 N/A N/A N/A N/A N/A N/A N/A

Miscellaneous

Transaction sizes based on how many contracts are deployed in the tx.

Metric 0 deployed contracts 1 deployed contracts
tx_size_in_bytes 17,187 39,991

Transaction processing duration by data writes.

Metric 0 new commitments 1 new commitments
tx_pxe_processing_time_ms 557 1,317
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 0.512 (-14%) 590

return new this(...args);
}
}

type InstructionConstructor = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style thing i like types at the top of files rather than bottom

@fcarreiro fcarreiro merged commit 84dbdd3 into master Feb 7, 2024
86 checks passed
@fcarreiro fcarreiro deleted the fc/02-07-chore_avm_add_SET_serialize_comments_and_simplify_signature branch February 7, 2024 17:10
Copy link
Contributor Author

Merge activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants